Skip to content

Disable distribution of intersection types over applied types #23441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

EugeneFlesselle
Copy link
Contributor

@EugeneFlesselle EugeneFlesselle commented Jun 27, 2025

Fixes soundness issue #23435

Note in particular that this implies we cannot (indirectly) inherit multiple instantiations of the same trait. E.g., see tests/neg/conflicting-inst-basetypes.scala.

The impact on the community-build appears to be rather reasonable, tweaks are required:

The changes should be relatively well regrouped by commit for review.

@EugeneFlesselle EugeneFlesselle force-pushed the distributeAnd branch 4 times, most recently from 2daa02b to 6171b84 Compare July 16, 2025 15:35
EugeneFlesselle added a commit to dotty-staging/dotty that referenced this pull request Jul 17, 2025
@EugeneFlesselle EugeneFlesselle marked this pull request as ready for review July 17, 2025 15:47
EugeneFlesselle added a commit to dotty-staging/dotty that referenced this pull request Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsoundness with distribution of intersection over covariant types
1 participant